package com.hefei.garden.controller;

import com.hefei.garden.dto.response.ResultVo;
import com.hefei.garden.mapper.UserInfoMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author: devil
 * @Date: 2022/7/21 20
 * @Description:
 */
@RequestMapping("/test")
@Controller
public class TestController {

    @RequestMapping(value = "/getInfo", method = RequestMethod.GET)
    @ResponseBody
    public String getInfo() {
        return "sss";

    }

    @Autowired
    private UserInfoMapper userInfoMapper;

    @RequestMapping(value = "/getInfo2", method = RequestMethod.GET)
    @ResponseBody
    public ResultVo getInfo2() {
        return new ResultVo(userInfoMapper.getUserInfoById(2,"ww"));

    }

}
